<template>
  <div>
    <van-popup v-model="show" round position="bottom" @click-overlay="overlayClick" :close-on-click-overlay="false">
      <div class="popup_content">
        <div class="popup_title">
          需要帮助？请联系我
        </div>
        <div class="ic_guide_box">
          <div class="ic_guide_qq flex" @click="zqq">
            <p class="guide_title">我的渠道专员</p>
            <span class="ic_guide_img"></span>
            <h4 class="ic_contact">QQ：{{userinfo.z_qq}}</h4>
            <p class="ic_slogan">推广遇到问题，就联系我哦!</p>
          </div>
          <div class="ic_guide_phone flex" @click="mobile">
            <p class="guide_title">联系渠道专员</p>
            <span class="ic_guide_img"></span>
            <h4 class="ic_contact">手机：{{userinfo.z_mobile}}</h4>
            <p class="ic_slogan">紧急问题，随时在线处理!</p>
          </div>
        </div>
      </div>
    </van-popup>
  </div>
</template>

<script>
  export default {
    props: {
      userinfo: {
        type: Object,
        default() {
          return {}
        }
      },
      show: {
        type: Boolean,
        default() {
          return {}
        }
      },
    },
    methods: {
      overlayClick() {
        this.$emit('overlay-click', this.show)
      },
      mobile() {
        window.location.href= 'tel://' + this.userinfo.z_mobile
      },
      zqq() {
        window.location.href= 'mqqwpa://im/chat?chat_type=wpa&uin=' + this.userinfo.z_qq + '&version=1&src_type=web&web_src=oicqzone.com'
      }
    },
  }
</script>

<style scoped>
.popup_content {
  width: 750px;
  background: #fff;
  margin: 0 auto;
}

.popup_title {
  padding: 55px 0 103px 0;
  font-weight: bold;
  font-size: 32px;
  color: #222;
  text-align: center;
}

.ic_guide_box {
  display: flex;
}

.ic_guide_qq .ic_contact {
  font-size: 32px;
  color: #0084FF;
  font-weight: 500;
}

.ic_guide_qq .ic_guide_img {
  display: block;
  margin: 0 auto 30px;
  width: 150px;
  height: 150px;
  background: url('../../../assets/img/home/ic_guide_qq.png') no-repeat;
  background-size: 100%;
}

.ic_guide_phone .ic_guide_img {
  display: block;
  margin: 0 auto 30px;
  width: 150px;
  height: 150px;
  background: url('../../../assets/img/home/ic_guide_phone.png') no-repeat;
  background-size: 100%;
}

.ic_guide_phone .ic_contact {
  font-size: 32px;
  color: #FF9600;
  font-weight: 500;
}

.guide_title {
  font-size: 30px;
  font-weight: bold;
  color: #222;
  padding-bottom: 22px;
}

.ic_slogan {
  font-size: 24px;
  color: #999;
  padding: 13px 0 111px 0;
}

.flex {
  flex: 1;
  text-align: center;
}
</style>